package com.summer.web.v1.controller;

import com.alibaba.fastjson.JSON;
import com.summer.common.lib.core.interfaces.RestController;
import com.summer.web.v1.service.UserService;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.Path;

@Path("/user")
public class UserRestController implements RestController {

    @Resource(name = "bean/UserService")
    private UserService userService;

    @Path("/selectAll")
    @Override
    public Object execute(HttpServletRequest req) throws Throwable {
        return JSON.toJSONString(userService.selectAll());
    }
}
